'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	let result = await db.collection(event.name)
		.aggregate()
		.match({
			category_id: event.id
		})
		.count('expensiveCount')
		.end()
	return result.data[0]
};